import React, { useState, useEffect } from 'react';
import { HashRouter, Route, hashHistory } from 'react-router-dom'

import CacheRoute, { CacheSwitch } from 'react-router-cache-route';

// 移动端
import Mobile_cgrk_llj from './shipSRM/cgrk/mobile_cgrk_llj.js'
import Mobile_sltzd_llj from './shipSRM/cgrk/mobile_sltzd_llj.js'
import Mobile_qgd_form from './shipSRM/cgrk/mobile_qgd_form.js'
import Mobile_qgd_list from './shipSRM/cgrk/mobile_qgd_list.js'
import Mobile_bgd_list from './shipSRM/cgrk/mobile_bgd_list.js'
import Mobile_bgd_form from './shipSRM/cgrk/mobile_bgd_form.js'
import Mobile_cprk_list from './shipSRM/cgrk/mobile_cprk_list.js'
import Mobile_cprk_form from './shipSRM/cgrk/mobile_cprk_form.js'
import Mobile_gpd_list from './shipSRM/cgrk/mobile_gpd_list.js';
import Mobile_gpd_form from './shipSRM/cgrk/mobile_gpd_form.js';


//科创
import Login from './login.js'

import Mobile_login from './mobile_login.js'

import Mainpage_new from './mainpage_new.js'

import Mobile_mainpage from './mobile_mainpage.js'

//报表
import Scllhz_print from './shipSRM/kc_report/scllhz_print.js';

import NotFound from './notFound.js';
import Tinymce from './shipSRM/newmes/tinymce.js';

const Routecontainer = () => {
  return (
    <div style={{
      position: 'relative', Left: '0', Right: '0', margin: 'auto',
      width: '100%', height: '100%', fontFamily: "'Noto Sans SC', sans-serif, Microsoft YaHei", backgroundColor: "#F1F1F1"
    }}>

      <HashRouter history={hashHistory}>
        <div style={{ position: "relative", width: '100%', height: '100%' }}>
          {/*春华汽配代码放这里*/}

          <Route exact path="/" component={Login} />
          <Route exact path="/mobile_login" component={Mobile_login} />
          
          

          {/* 主应用路由 - 这个会处理所有 /shipSRM 开头的路由 */}
          <Route path="/shipSRM" component={Mainpage_new} />

          {/* 404 Route */}
          <Route path="/shipSRM/404" component={NotFound} />

          <Route path="/shipSRM/tinymce" component={Tinymce} />

          {/* 特殊路由 - 不在主布局中的路由 */}
          <Route path="/shipSRM_one/report/scllhz_print" component={Scllhz_print} />

          {/*移动端pda报工 移动端不要加记忆*/}
          <Route path="/shipSRM_mobile/mobile_mainpage" component={Mobile_mainpage} />
          <Route path="/shipSRM_mobile/cgrk/mobile_cgrk_llj" component={Mobile_cgrk_llj} />
          <Route path="/shipSRM_mobile/cgrk/mobile_sltzd_llj" component={Mobile_sltzd_llj} />
          <Route path="/shipSRM_mobile/cggl/mobile_qgd_form" component={Mobile_qgd_form} />
          <Route path="/shipSRM_mobile/cggl/mobile_qgd_list" component={Mobile_qgd_list} />
          <Route path="/shipSRM_mobile/cgrk/mobile_bgd_list" component={Mobile_bgd_list} />
          <Route path="/shipSRM_mobile/cgrk/mobile_bgd_form" component={Mobile_bgd_form} />
          <Route path="/shipSRM_mobile/cgrk/mobile_gpd_list" component={Mobile_gpd_list} />
          <Route path="/shipSRM_mobile/cgrk/mobile_gpd_form" component={Mobile_gpd_form} />
          <Route path="/shipSRM_mobile/scgl/mobile_cprk_list" component={Mobile_cprk_list} />
          <Route path="/shipSRM_mobile/scgl/mobile_cprk_form" component={Mobile_cprk_form} />

        </div>
      </HashRouter>
    </div>
  );
};

export default Routecontainer